#!/bin/bash
set -o nounset                              # Treat unset variables as an error
echo '
set terminal epslatex color colortext
set output "watt_4_streams_final.tex"
set title "Network speed with 4 streams"
set key right center
set xlabel "Time(s)"
set ylabel "Mb/s"
      f(x) = mean_y
      fit f(x) "data/watt_4_streams_final" u 1:2 via mean_y
      set label 3 gprintf("Mean = %gMb/s", mean_y) at  68,2830
plot "data/watt_4_streams_final" using 1:3 with line title "Total","data/watt_4_streams_final" using 1:9 with line title "Stream 0","data/watt_4_streams_final" using 1:10 with line title "Stream 1","data/watt_4_streams_final" using 1:11 with line title "Stream 2","data/watt_4_streams_final" using 1:12 with line title "Stream 3"
' |gnuplot -persist      
